<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>SFML - Simple and Fast Multimedia Library</title>
        <meta http-equiv="Content-Type" content="text/html;"/>
        <meta charset="utf-8"/>
        <!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
        <link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
        <script type="text/javascript" src="jquery.js"></script>
        <script type="text/javascript" src="dynsections.js"></script>
        <link rel="stylesheet" type="text/css" href="search/search.css" />
        <link rel="stylesheet" type="text/css" href="searchOverrides.css" />
        <script type="text/javascript" src="search/searchdata.js"></script>
        <script type="text/javascript" src="search/search.js"></script>
        <script type="text/javascript">
        /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
          $(document).ready(function() { init_search(); });
        /* @license-end */
        </script>
    </head>
    <body>
        <div id="banner-container">
            <div id="banner">
                <span id="sfml">SFML 2.6.1</span>
            </div>
        </div>
        <div id="content">
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1Sprite.html">Sprite</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classsf_1_1Sprite-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">sf::Sprite Class Reference<div class="ingroups"><a class="el" href="group__graphics.html">Graphics module</a></div></div></div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classsf_1_1Drawable.html" title="Abstract base class for objects that can be drawn to a render target.">Drawable</a> representation of a texture, with its own transformations, color, etc.  
 <a href="classsf_1_1Sprite.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Sprite_8hpp_source.html">SFML/Graphics/Sprite.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::Sprite:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsf_1_1Sprite.png" usemap="#sf::Sprite_map" alt=""/>
  <map id="sf::Sprite_map" name="sf::Sprite_map">
<area href="classsf_1_1Drawable.html" title="Abstract base class for objects that can be drawn to a render target." alt="sf::Drawable" shape="rect" coords="0,0,109,24"/>
<area href="classsf_1_1Transformable.html" title="Decomposed transform defined by a position, a rotation and a scale." alt="sf::Transformable" shape="rect" coords="119,0,228,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a92559fbca895a96758abf5eabab96984"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#a92559fbca895a96758abf5eabab96984">Sprite</a> ()</td></tr>
<tr class="memdesc:a92559fbca895a96758abf5eabab96984"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <br /></td></tr>
<tr class="separator:a92559fbca895a96758abf5eabab96984"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a9fca374d7abf084bb1c143a879ff4a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#a2a9fca374d7abf084bb1c143a879ff4a">Sprite</a> (const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;texture)</td></tr>
<tr class="memdesc:a2a9fca374d7abf084bb1c143a879ff4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct the sprite from a source texture.  <br /></td></tr>
<tr class="separator:a2a9fca374d7abf084bb1c143a879ff4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01cfe1402372d243dbaa2ffa96020206"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#a01cfe1402372d243dbaa2ffa96020206">Sprite</a> (const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;texture, const <a class="el" href="classsf_1_1Rect.html">IntRect</a> &amp;rectangle)</td></tr>
<tr class="memdesc:a01cfe1402372d243dbaa2ffa96020206"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct the sprite from a sub-rectangle of a source texture.  <br /></td></tr>
<tr class="separator:a01cfe1402372d243dbaa2ffa96020206"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3729c88d88ac38c19317c18e87242560"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#a3729c88d88ac38c19317c18e87242560">setTexture</a> (const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;texture, bool resetRect=false)</td></tr>
<tr class="memdesc:a3729c88d88ac38c19317c18e87242560"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the source texture of the sprite.  <br /></td></tr>
<tr class="separator:a3729c88d88ac38c19317c18e87242560"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fefec419a4e6a90c0fd54c793d82ec2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#a3fefec419a4e6a90c0fd54c793d82ec2">setTextureRect</a> (const <a class="el" href="classsf_1_1Rect.html">IntRect</a> &amp;rectangle)</td></tr>
<tr class="memdesc:a3fefec419a4e6a90c0fd54c793d82ec2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the sub-rectangle of the texture that the sprite will display.  <br /></td></tr>
<tr class="separator:a3fefec419a4e6a90c0fd54c793d82ec2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14def44da6437bfea20c4df5e71aba4c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#a14def44da6437bfea20c4df5e71aba4c">setColor</a> (const <a class="el" href="classsf_1_1Color.html">Color</a> &amp;color)</td></tr>
<tr class="memdesc:a14def44da6437bfea20c4df5e71aba4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the global color of the sprite.  <br /></td></tr>
<tr class="separator:a14def44da6437bfea20c4df5e71aba4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d0f107b5dd5976be50bc5b163ba21aa"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Texture.html">Texture</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#a6d0f107b5dd5976be50bc5b163ba21aa">getTexture</a> () const</td></tr>
<tr class="memdesc:a6d0f107b5dd5976be50bc5b163ba21aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the source texture of the sprite.  <br /></td></tr>
<tr class="separator:a6d0f107b5dd5976be50bc5b163ba21aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb19e5b4f39d17cf4d95752b3a79bcb6"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Rect.html">IntRect</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#afb19e5b4f39d17cf4d95752b3a79bcb6">getTextureRect</a> () const</td></tr>
<tr class="memdesc:afb19e5b4f39d17cf4d95752b3a79bcb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the sub-rectangle of the texture displayed by the sprite.  <br /></td></tr>
<tr class="separator:afb19e5b4f39d17cf4d95752b3a79bcb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4a3ee8177fdd6e472a360a0a837d7cf"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Color.html">Color</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#af4a3ee8177fdd6e472a360a0a837d7cf">getColor</a> () const</td></tr>
<tr class="memdesc:af4a3ee8177fdd6e472a360a0a837d7cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the global color of the sprite.  <br /></td></tr>
<tr class="separator:af4a3ee8177fdd6e472a360a0a837d7cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2f4c781464da6f8a52b1df6058a48b8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Rect.html">FloatRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#ab2f4c781464da6f8a52b1df6058a48b8">getLocalBounds</a> () const</td></tr>
<tr class="memdesc:ab2f4c781464da6f8a52b1df6058a48b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the local bounding rectangle of the entity.  <br /></td></tr>
<tr class="separator:ab2f4c781464da6f8a52b1df6058a48b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa795483096b90745b2e799532963e271"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Rect.html">FloatRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.html#aa795483096b90745b2e799532963e271">getGlobalBounds</a> () const</td></tr>
<tr class="memdesc:aa795483096b90745b2e799532963e271"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the global bounding rectangle of the entity.  <br /></td></tr>
<tr class="separator:aa795483096b90745b2e799532963e271"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dbfb1a7c80688b0b4c477d706550208"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#a4dbfb1a7c80688b0b4c477d706550208">setPosition</a> (float x, float y)</td></tr>
<tr class="memdesc:a4dbfb1a7c80688b0b4c477d706550208"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the position of the object  <br /></td></tr>
<tr class="separator:a4dbfb1a7c80688b0b4c477d706550208"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1a42209ce2b5d3f07b00f917bcd8015"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#af1a42209ce2b5d3f07b00f917bcd8015">setPosition</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;position)</td></tr>
<tr class="memdesc:af1a42209ce2b5d3f07b00f917bcd8015"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the position of the object  <br /></td></tr>
<tr class="separator:af1a42209ce2b5d3f07b00f917bcd8015"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32baf2bf1a74699b03bf8c95030a38ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#a32baf2bf1a74699b03bf8c95030a38ed">setRotation</a> (float angle)</td></tr>
<tr class="memdesc:a32baf2bf1a74699b03bf8c95030a38ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the orientation of the object  <br /></td></tr>
<tr class="separator:a32baf2bf1a74699b03bf8c95030a38ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaec50b46b3f41b054763304d1e727471"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#aaec50b46b3f41b054763304d1e727471">setScale</a> (float factorX, float factorY)</td></tr>
<tr class="memdesc:aaec50b46b3f41b054763304d1e727471"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the scale factors of the object  <br /></td></tr>
<tr class="separator:aaec50b46b3f41b054763304d1e727471"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c48a87f1626047e448f9c1a68ff167e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#a4c48a87f1626047e448f9c1a68ff167e">setScale</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;factors)</td></tr>
<tr class="memdesc:a4c48a87f1626047e448f9c1a68ff167e"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the scale factors of the object  <br /></td></tr>
<tr class="separator:a4c48a87f1626047e448f9c1a68ff167e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56c67bd80aae8418d13fb96c034d25ec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#a56c67bd80aae8418d13fb96c034d25ec">setOrigin</a> (float x, float y)</td></tr>
<tr class="memdesc:a56c67bd80aae8418d13fb96c034d25ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the local origin of the object  <br /></td></tr>
<tr class="separator:a56c67bd80aae8418d13fb96c034d25ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa93a835ffbf3bee2098dfbbc695a7f05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#aa93a835ffbf3bee2098dfbbc695a7f05">setOrigin</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;origin)</td></tr>
<tr class="memdesc:aa93a835ffbf3bee2098dfbbc695a7f05"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the local origin of the object  <br /></td></tr>
<tr class="separator:aa93a835ffbf3bee2098dfbbc695a7f05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea8b18e91a7bf7be589851bb9dd11241"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#aea8b18e91a7bf7be589851bb9dd11241">getPosition</a> () const</td></tr>
<tr class="memdesc:aea8b18e91a7bf7be589851bb9dd11241"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the position of the object  <br /></td></tr>
<tr class="separator:aea8b18e91a7bf7be589851bb9dd11241"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa00b5c5d4a06ac24a94dd72c56931d3a"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#aa00b5c5d4a06ac24a94dd72c56931d3a">getRotation</a> () const</td></tr>
<tr class="memdesc:aa00b5c5d4a06ac24a94dd72c56931d3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the orientation of the object  <br /></td></tr>
<tr class="separator:aa00b5c5d4a06ac24a94dd72c56931d3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bcae0e924213f2e89edd8926f2453af"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#a7bcae0e924213f2e89edd8926f2453af">getScale</a> () const</td></tr>
<tr class="memdesc:a7bcae0e924213f2e89edd8926f2453af"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the current scale of the object  <br /></td></tr>
<tr class="separator:a7bcae0e924213f2e89edd8926f2453af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a898b33eb6513161eb5c747a072364f15"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#a898b33eb6513161eb5c747a072364f15">getOrigin</a> () const</td></tr>
<tr class="memdesc:a898b33eb6513161eb5c747a072364f15"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the local origin of the object  <br /></td></tr>
<tr class="separator:a898b33eb6513161eb5c747a072364f15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86b461d6a941ad390c2ad8b6a4a20391"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#a86b461d6a941ad390c2ad8b6a4a20391">move</a> (float offsetX, float offsetY)</td></tr>
<tr class="memdesc:a86b461d6a941ad390c2ad8b6a4a20391"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move the object by a given offset.  <br /></td></tr>
<tr class="separator:a86b461d6a941ad390c2ad8b6a4a20391"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9ca691522f6ddc1a40406849b87c469"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#ab9ca691522f6ddc1a40406849b87c469">move</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;offset)</td></tr>
<tr class="memdesc:ab9ca691522f6ddc1a40406849b87c469"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move the object by a given offset.  <br /></td></tr>
<tr class="separator:ab9ca691522f6ddc1a40406849b87c469"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8a5ffddc0d93f238fee3bf8efe1ebda"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#af8a5ffddc0d93f238fee3bf8efe1ebda">rotate</a> (float angle)</td></tr>
<tr class="memdesc:af8a5ffddc0d93f238fee3bf8efe1ebda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotate the object.  <br /></td></tr>
<tr class="separator:af8a5ffddc0d93f238fee3bf8efe1ebda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3de0c6d8957f3cf318092f3f60656391"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#a3de0c6d8957f3cf318092f3f60656391">scale</a> (float factorX, float factorY)</td></tr>
<tr class="memdesc:a3de0c6d8957f3cf318092f3f60656391"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scale the object.  <br /></td></tr>
<tr class="separator:a3de0c6d8957f3cf318092f3f60656391"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adecaa6c69b1f27dd5194b067d96bb694"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#adecaa6c69b1f27dd5194b067d96bb694">scale</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;factor)</td></tr>
<tr class="memdesc:adecaa6c69b1f27dd5194b067d96bb694"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scale the object.  <br /></td></tr>
<tr class="separator:adecaa6c69b1f27dd5194b067d96bb694"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e1b4772a451ec66ac7e6af655726154"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Transform.html">Transform</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#a3e1b4772a451ec66ac7e6af655726154">getTransform</a> () const</td></tr>
<tr class="memdesc:a3e1b4772a451ec66ac7e6af655726154"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the combined transform of the object  <br /></td></tr>
<tr class="separator:a3e1b4772a451ec66ac7e6af655726154"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5e75d724436069d2268791c6b486916"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Transform.html">Transform</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Transformable.html#ac5e75d724436069d2268791c6b486916">getInverseTransform</a> () const</td></tr>
<tr class="memdesc:ac5e75d724436069d2268791c6b486916"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the inverse of the combined transform of the object  <br /></td></tr>
<tr class="separator:ac5e75d724436069d2268791c6b486916"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classsf_1_1Drawable.html" title="Abstract base class for objects that can be drawn to a render target.">Drawable</a> representation of a texture, with its own transformations, color, etc. </p>
<p><a class="el" href="classsf_1_1Sprite.html" title="Drawable representation of a texture, with its own transformations, color, etc.">sf::Sprite</a> is a drawable class that allows to easily display a texture (or a part of it) on a render target.</p>
<p>It inherits all the functions from <a class="el" href="classsf_1_1Transformable.html" title="Decomposed transform defined by a position, a rotation and a scale.">sf::Transformable</a>: position, rotation, scale, origin. It also adds sprite-specific properties such as the texture to use, the part of it to display, and some convenience functions to change the overall color of the sprite, or to get its bounding rectangle.</p>
<p><a class="el" href="classsf_1_1Sprite.html" title="Drawable representation of a texture, with its own transformations, color, etc.">sf::Sprite</a> works in combination with the <a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> class, which loads and provides the pixel data of a given texture.</p>
<p>The separation of <a class="el" href="classsf_1_1Sprite.html" title="Drawable representation of a texture, with its own transformations, color, etc.">sf::Sprite</a> and <a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> allows more flexibility and better performances: indeed a <a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> is a heavy resource, and any operation on it is slow (often too slow for real-time applications). On the other side, a <a class="el" href="classsf_1_1Sprite.html" title="Drawable representation of a texture, with its own transformations, color, etc.">sf::Sprite</a> is a lightweight object which can use the pixel data of a <a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> and draw it with its own transformation/color/blending attributes.</p>
<p>It is important to note that the <a class="el" href="classsf_1_1Sprite.html" title="Drawable representation of a texture, with its own transformations, color, etc.">sf::Sprite</a> instance doesn't copy the texture that it uses, it only keeps a reference to it. Thus, a <a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> must not be destroyed while it is used by a <a class="el" href="classsf_1_1Sprite.html" title="Drawable representation of a texture, with its own transformations, color, etc.">sf::Sprite</a> (i.e. never write a function that uses a local <a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> instance for creating a sprite).</p>
<p>See also the note on coordinates and undistorted rendering in <a class="el" href="classsf_1_1Transformable.html" title="Decomposed transform defined by a position, a rotation and a scale.">sf::Transformable</a>.</p>
<p>Usage example: </p><div class="fragment"><div class="line"><span class="comment">// Declare and load a texture</span></div>
<div class="line"><a class="code hl_class" href="classsf_1_1Texture.html">sf::Texture</a> texture;</div>
<div class="line">texture.<a class="code hl_function" href="classsf_1_1Texture.html#a8e1b56eabfe33e2e0e1cb03712c7fcc7">loadFromFile</a>(<span class="stringliteral">&quot;texture.png&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Create a sprite</span></div>
<div class="line"><a class="code hl_class" href="classsf_1_1Sprite.html">sf::Sprite</a> sprite;</div>
<div class="line">sprite.<a class="code hl_function" href="classsf_1_1Sprite.html#a3729c88d88ac38c19317c18e87242560">setTexture</a>(texture);</div>
<div class="line">sprite.<a class="code hl_function" href="classsf_1_1Sprite.html#a3fefec419a4e6a90c0fd54c793d82ec2">setTextureRect</a>(<a class="code hl_class" href="classsf_1_1Rect.html">sf::IntRect</a>(10, 10, 50, 30));</div>
<div class="line">sprite.<a class="code hl_function" href="classsf_1_1Sprite.html#a14def44da6437bfea20c4df5e71aba4c">setColor</a>(<a class="code hl_class" href="classsf_1_1Color.html">sf::Color</a>(255, 255, 255, 200));</div>
<div class="line">sprite.<a class="code hl_function" href="classsf_1_1Transformable.html#a4dbfb1a7c80688b0b4c477d706550208">setPosition</a>(100, 25);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Draw it</span></div>
<div class="line">window.draw(sprite);</div>
<div class="ttc" id="aclasssf_1_1Color_html"><div class="ttname"><a href="classsf_1_1Color.html">sf::Color</a></div><div class="ttdoc">Utility class for manipulating RGBA colors.</div><div class="ttdef"><b>Definition</b> <a href="Color_8hpp_source.html#l00040">Color.hpp:41</a></div></div>
<div class="ttc" id="aclasssf_1_1Rect_html"><div class="ttname"><a href="classsf_1_1Rect.html">sf::Rect&lt; int &gt;</a></div></div>
<div class="ttc" id="aclasssf_1_1Sprite_html"><div class="ttname"><a href="classsf_1_1Sprite.html">sf::Sprite</a></div><div class="ttdoc">Drawable representation of a texture, with its own transformations, color, etc.</div><div class="ttdef"><b>Definition</b> <a href="Sprite_8hpp_source.html#l00047">Sprite.hpp:48</a></div></div>
<div class="ttc" id="aclasssf_1_1Sprite_html_a14def44da6437bfea20c4df5e71aba4c"><div class="ttname"><a href="classsf_1_1Sprite.html#a14def44da6437bfea20c4df5e71aba4c">sf::Sprite::setColor</a></div><div class="ttdeci">void setColor(const Color &amp;color)</div><div class="ttdoc">Set the global color of the sprite.</div></div>
<div class="ttc" id="aclasssf_1_1Sprite_html_a3729c88d88ac38c19317c18e87242560"><div class="ttname"><a href="classsf_1_1Sprite.html#a3729c88d88ac38c19317c18e87242560">sf::Sprite::setTexture</a></div><div class="ttdeci">void setTexture(const Texture &amp;texture, bool resetRect=false)</div><div class="ttdoc">Change the source texture of the sprite.</div></div>
<div class="ttc" id="aclasssf_1_1Sprite_html_a3fefec419a4e6a90c0fd54c793d82ec2"><div class="ttname"><a href="classsf_1_1Sprite.html#a3fefec419a4e6a90c0fd54c793d82ec2">sf::Sprite::setTextureRect</a></div><div class="ttdeci">void setTextureRect(const IntRect &amp;rectangle)</div><div class="ttdoc">Set the sub-rectangle of the texture that the sprite will display.</div></div>
<div class="ttc" id="aclasssf_1_1Texture_html"><div class="ttname"><a href="classsf_1_1Texture.html">sf::Texture</a></div><div class="ttdoc">Image living on the graphics card that can be used for drawing.</div><div class="ttdef"><b>Definition</b> <a href="Texture_8hpp_source.html#l00048">Texture.hpp:49</a></div></div>
<div class="ttc" id="aclasssf_1_1Texture_html_a8e1b56eabfe33e2e0e1cb03712c7fcc7"><div class="ttname"><a href="classsf_1_1Texture.html#a8e1b56eabfe33e2e0e1cb03712c7fcc7">sf::Texture::loadFromFile</a></div><div class="ttdeci">bool loadFromFile(const std::string &amp;filename, const IntRect &amp;area=IntRect())</div><div class="ttdoc">Load the texture from a file on disk.</div></div>
<div class="ttc" id="aclasssf_1_1Transformable_html_a4dbfb1a7c80688b0b4c477d706550208"><div class="ttname"><a href="classsf_1_1Transformable.html#a4dbfb1a7c80688b0b4c477d706550208">sf::Transformable::setPosition</a></div><div class="ttdeci">void setPosition(float x, float y)</div><div class="ttdoc">set the position of the object</div></div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a>, <a class="el" href="classsf_1_1Transformable.html" title="Decomposed transform defined by a position, a rotation and a scale.">sf::Transformable</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="Sprite_8hpp_source.html#l00047">47</a> of file <a class="el" href="Sprite_8hpp_source.html">Sprite.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a92559fbca895a96758abf5eabab96984" name="a92559fbca895a96758abf5eabab96984"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92559fbca895a96758abf5eabab96984">&#9670;&#160;</a></span>Sprite() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::Sprite::Sprite </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>Creates an empty sprite with no source texture. </p>

</div>
</div>
<a id="a2a9fca374d7abf084bb1c143a879ff4a" name="a2a9fca374d7abf084bb1c143a879ff4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a9fca374d7abf084bb1c143a879ff4a">&#9670;&#160;</a></span>Sprite() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sf::Sprite::Sprite </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;&#160;</td>
          <td class="paramname"><em>texture</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct the sprite from a source texture. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">texture</td><td>Source texture</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Sprite.html#a3729c88d88ac38c19317c18e87242560" title="Change the source texture of the sprite.">setTexture</a> </dd></dl>

</div>
</div>
<a id="a01cfe1402372d243dbaa2ffa96020206" name="a01cfe1402372d243dbaa2ffa96020206"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01cfe1402372d243dbaa2ffa96020206">&#9670;&#160;</a></span>Sprite() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::Sprite::Sprite </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;&#160;</td>
          <td class="paramname"><em>texture</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Rect.html">IntRect</a> &amp;&#160;</td>
          <td class="paramname"><em>rectangle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Construct the sprite from a sub-rectangle of a source texture. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">texture</td><td>Source texture </td></tr>
    <tr><td class="paramname">rectangle</td><td>Sub-rectangle of the texture to assign to the sprite</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Sprite.html#a3729c88d88ac38c19317c18e87242560" title="Change the source texture of the sprite.">setTexture</a>, <a class="el" href="classsf_1_1Sprite.html#a3fefec419a4e6a90c0fd54c793d82ec2" title="Set the sub-rectangle of the texture that the sprite will display.">setTextureRect</a> </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af4a3ee8177fdd6e472a360a0a837d7cf" name="af4a3ee8177fdd6e472a360a0a837d7cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4a3ee8177fdd6e472a360a0a837d7cf">&#9670;&#160;</a></span>getColor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Color.html">Color</a> &amp; sf::Sprite::getColor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the global color of the sprite. </p>
<dl class="section return"><dt>Returns</dt><dd>Global color of the sprite</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Sprite.html#a14def44da6437bfea20c4df5e71aba4c" title="Set the global color of the sprite.">setColor</a> </dd></dl>

</div>
</div>
<a id="aa795483096b90745b2e799532963e271" name="aa795483096b90745b2e799532963e271"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa795483096b90745b2e799532963e271">&#9670;&#160;</a></span>getGlobalBounds()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsf_1_1Rect.html">FloatRect</a> sf::Sprite::getGlobalBounds </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the global bounding rectangle of the entity. </p>
<p>The returned rectangle is in global coordinates, which means that it takes into account the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the sprite in the global 2D world's coordinate system.</p>
<dl class="section return"><dt>Returns</dt><dd>Global bounding rectangle of the entity </dd></dl>

</div>
</div>
<a id="ac5e75d724436069d2268791c6b486916" name="ac5e75d724436069d2268791c6b486916"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5e75d724436069d2268791c6b486916">&#9670;&#160;</a></span>getInverseTransform()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Transform.html">Transform</a> &amp; sf::Transformable::getInverseTransform </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the inverse of the combined transform of the object </p>
<dl class="section return"><dt>Returns</dt><dd>Inverse of the combined transformations applied to the object</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a3e1b4772a451ec66ac7e6af655726154" title="get the combined transform of the object">getTransform</a> </dd></dl>

</div>
</div>
<a id="ab2f4c781464da6f8a52b1df6058a48b8" name="ab2f4c781464da6f8a52b1df6058a48b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2f4c781464da6f8a52b1df6058a48b8">&#9670;&#160;</a></span>getLocalBounds()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsf_1_1Rect.html">FloatRect</a> sf::Sprite::getLocalBounds </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the local bounding rectangle of the entity. </p>
<p>The returned rectangle is in local coordinates, which means that it ignores the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the entity in the entity's coordinate system.</p>
<dl class="section return"><dt>Returns</dt><dd>Local bounding rectangle of the entity </dd></dl>

</div>
</div>
<a id="a898b33eb6513161eb5c747a072364f15" name="a898b33eb6513161eb5c747a072364f15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a898b33eb6513161eb5c747a072364f15">&#9670;&#160;</a></span>getOrigin()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp; sf::Transformable::getOrigin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the local origin of the object </p>
<dl class="section return"><dt>Returns</dt><dd>Current origin</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a56c67bd80aae8418d13fb96c034d25ec" title="set the local origin of the object">setOrigin</a> </dd></dl>

</div>
</div>
<a id="aea8b18e91a7bf7be589851bb9dd11241" name="aea8b18e91a7bf7be589851bb9dd11241"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea8b18e91a7bf7be589851bb9dd11241">&#9670;&#160;</a></span>getPosition()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp; sf::Transformable::getPosition </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the position of the object </p>
<dl class="section return"><dt>Returns</dt><dd>Current position</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a4dbfb1a7c80688b0b4c477d706550208" title="set the position of the object">setPosition</a> </dd></dl>

</div>
</div>
<a id="aa00b5c5d4a06ac24a94dd72c56931d3a" name="aa00b5c5d4a06ac24a94dd72c56931d3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa00b5c5d4a06ac24a94dd72c56931d3a">&#9670;&#160;</a></span>getRotation()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float sf::Transformable::getRotation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the orientation of the object </p>
<p>The rotation is always in the range [0, 360].</p>
<dl class="section return"><dt>Returns</dt><dd>Current rotation, in degrees</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a32baf2bf1a74699b03bf8c95030a38ed" title="set the orientation of the object">setRotation</a> </dd></dl>

</div>
</div>
<a id="a7bcae0e924213f2e89edd8926f2453af" name="a7bcae0e924213f2e89edd8926f2453af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7bcae0e924213f2e89edd8926f2453af">&#9670;&#160;</a></span>getScale()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp; sf::Transformable::getScale </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the current scale of the object </p>
<dl class="section return"><dt>Returns</dt><dd>Current scale factors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#aaec50b46b3f41b054763304d1e727471" title="set the scale factors of the object">setScale</a> </dd></dl>

</div>
</div>
<a id="a6d0f107b5dd5976be50bc5b163ba21aa" name="a6d0f107b5dd5976be50bc5b163ba21aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d0f107b5dd5976be50bc5b163ba21aa">&#9670;&#160;</a></span>getTexture()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Texture.html">Texture</a> * sf::Sprite::getTexture </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the source texture of the sprite. </p>
<p>If the sprite has no source texture, a NULL pointer is returned. The returned pointer is const, which means that you can't modify the texture when you retrieve it with this function.</p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the sprite's texture</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Sprite.html#a3729c88d88ac38c19317c18e87242560" title="Change the source texture of the sprite.">setTexture</a> </dd></dl>

</div>
</div>
<a id="afb19e5b4f39d17cf4d95752b3a79bcb6" name="afb19e5b4f39d17cf4d95752b3a79bcb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb19e5b4f39d17cf4d95752b3a79bcb6">&#9670;&#160;</a></span>getTextureRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Rect.html">IntRect</a> &amp; sf::Sprite::getTextureRect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the sub-rectangle of the texture displayed by the sprite. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing.">Texture</a> rectangle of the sprite</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Sprite.html#a3fefec419a4e6a90c0fd54c793d82ec2" title="Set the sub-rectangle of the texture that the sprite will display.">setTextureRect</a> </dd></dl>

</div>
</div>
<a id="a3e1b4772a451ec66ac7e6af655726154" name="a3e1b4772a451ec66ac7e6af655726154"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e1b4772a451ec66ac7e6af655726154">&#9670;&#160;</a></span>getTransform()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Transform.html">Transform</a> &amp; sf::Transformable::getTransform </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the combined transform of the object </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classsf_1_1Transform.html" title="Define a 3x3 transform matrix.">Transform</a> combining the position/rotation/scale/origin of the object</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#ac5e75d724436069d2268791c6b486916" title="get the inverse of the combined transform of the object">getInverseTransform</a> </dd></dl>

</div>
</div>
<a id="ab9ca691522f6ddc1a40406849b87c469" name="ab9ca691522f6ddc1a40406849b87c469"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9ca691522f6ddc1a40406849b87c469">&#9670;&#160;</a></span>move() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::move </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
          <td class="paramname"><em>offset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Move the object by a given offset. </p>
<p>This function adds to the current position of the object, unlike setPosition which overwrites it. Thus, it is equivalent to the following code: </p><div class="fragment"><div class="line"><span class="keywordtype">object</span>.setPosition(<span class="keywordtype">object</span>.<a class="code hl_function" href="classsf_1_1Transformable.html#aea8b18e91a7bf7be589851bb9dd11241">getPosition</a>() + offset);</div>
<div class="ttc" id="aclasssf_1_1Transformable_html_aea8b18e91a7bf7be589851bb9dd11241"><div class="ttname"><a href="classsf_1_1Transformable.html#aea8b18e91a7bf7be589851bb9dd11241">sf::Transformable::getPosition</a></div><div class="ttdeci">const Vector2f &amp; getPosition() const</div><div class="ttdoc">get the position of the object</div></div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">offset</td><td>Offset</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a4dbfb1a7c80688b0b4c477d706550208" title="set the position of the object">setPosition</a> </dd></dl>

</div>
</div>
<a id="a86b461d6a941ad390c2ad8b6a4a20391" name="a86b461d6a941ad390c2ad8b6a4a20391"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86b461d6a941ad390c2ad8b6a4a20391">&#9670;&#160;</a></span>move() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::move </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>offsetX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>offsetY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Move the object by a given offset. </p>
<p>This function adds to the current position of the object, unlike setPosition which overwrites it. Thus, it is equivalent to the following code: </p><div class="fragment"><div class="line"><a class="code hl_class" href="classsf_1_1Vector2.html">sf::Vector2f</a> pos = <span class="keywordtype">object</span>.getPosition();</div>
<div class="line"><span class="keywordtype">object</span>.setPosition(pos.<a class="code hl_variable" href="classsf_1_1Vector2.html#a1e6ad77fa155f3753bfb92699bd28141">x</a> + offsetX, pos.<a class="code hl_variable" href="classsf_1_1Vector2.html#a420f2481b015f4eb929c75f2af564299">y</a> + offsetY);</div>
<div class="ttc" id="aclasssf_1_1Vector2_html"><div class="ttname"><a href="classsf_1_1Vector2.html">sf::Vector2&lt; float &gt;</a></div></div>
<div class="ttc" id="aclasssf_1_1Vector2_html_a1e6ad77fa155f3753bfb92699bd28141"><div class="ttname"><a href="classsf_1_1Vector2.html#a1e6ad77fa155f3753bfb92699bd28141">sf::Vector2::x</a></div><div class="ttdeci">T x</div><div class="ttdoc">X coordinate of the vector.</div><div class="ttdef"><b>Definition</b> <a href="Vector2_8hpp_source.html#l00075">Vector2.hpp:75</a></div></div>
<div class="ttc" id="aclasssf_1_1Vector2_html_a420f2481b015f4eb929c75f2af564299"><div class="ttname"><a href="classsf_1_1Vector2.html#a420f2481b015f4eb929c75f2af564299">sf::Vector2::y</a></div><div class="ttdeci">T y</div><div class="ttdoc">Y coordinate of the vector.</div><div class="ttdef"><b>Definition</b> <a href="Vector2_8hpp_source.html#l00076">Vector2.hpp:76</a></div></div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">offsetX</td><td>X offset </td></tr>
    <tr><td class="paramname">offsetY</td><td>Y offset</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a4dbfb1a7c80688b0b4c477d706550208" title="set the position of the object">setPosition</a> </dd></dl>

</div>
</div>
<a id="af8a5ffddc0d93f238fee3bf8efe1ebda" name="af8a5ffddc0d93f238fee3bf8efe1ebda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8a5ffddc0d93f238fee3bf8efe1ebda">&#9670;&#160;</a></span>rotate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::rotate </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>angle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Rotate the object. </p>
<p>This function adds to the current rotation of the object, unlike setRotation which overwrites it. Thus, it is equivalent to the following code: </p><div class="fragment"><div class="line"><span class="keywordtype">object</span>.setRotation(<span class="keywordtype">object</span>.<a class="code hl_function" href="classsf_1_1Transformable.html#aa00b5c5d4a06ac24a94dd72c56931d3a">getRotation</a>() + angle);</div>
<div class="ttc" id="aclasssf_1_1Transformable_html_aa00b5c5d4a06ac24a94dd72c56931d3a"><div class="ttname"><a href="classsf_1_1Transformable.html#aa00b5c5d4a06ac24a94dd72c56931d3a">sf::Transformable::getRotation</a></div><div class="ttdeci">float getRotation() const</div><div class="ttdoc">get the orientation of the object</div></div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">angle</td><td>Angle of rotation, in degrees </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="adecaa6c69b1f27dd5194b067d96bb694" name="adecaa6c69b1f27dd5194b067d96bb694"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adecaa6c69b1f27dd5194b067d96bb694">&#9670;&#160;</a></span>scale() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::scale </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
          <td class="paramname"><em>factor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Scale the object. </p>
<p>This function multiplies the current scale of the object, unlike setScale which overwrites it. Thus, it is equivalent to the following code: </p><div class="fragment"><div class="line"><a class="code hl_class" href="classsf_1_1Vector2.html">sf::Vector2f</a> <a class="code hl_function" href="classsf_1_1Transformable.html#a3de0c6d8957f3cf318092f3f60656391">scale</a> = <span class="keywordtype">object</span>.getScale();</div>
<div class="line"><span class="keywordtype">object</span>.setScale(<a class="code hl_function" href="classsf_1_1Transformable.html#a3de0c6d8957f3cf318092f3f60656391">scale</a>.x * factor.x, <a class="code hl_function" href="classsf_1_1Transformable.html#a3de0c6d8957f3cf318092f3f60656391">scale</a>.y * factor.y);</div>
<div class="ttc" id="aclasssf_1_1Transformable_html_a3de0c6d8957f3cf318092f3f60656391"><div class="ttname"><a href="classsf_1_1Transformable.html#a3de0c6d8957f3cf318092f3f60656391">sf::Transformable::scale</a></div><div class="ttdeci">void scale(float factorX, float factorY)</div><div class="ttdoc">Scale the object.</div></div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">factor</td><td>Scale factors</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#aaec50b46b3f41b054763304d1e727471" title="set the scale factors of the object">setScale</a> </dd></dl>

</div>
</div>
<a id="a3de0c6d8957f3cf318092f3f60656391" name="a3de0c6d8957f3cf318092f3f60656391"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3de0c6d8957f3cf318092f3f60656391">&#9670;&#160;</a></span>scale() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::scale </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>factorX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>factorY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Scale the object. </p>
<p>This function multiplies the current scale of the object, unlike setScale which overwrites it. Thus, it is equivalent to the following code: </p><div class="fragment"><div class="line"><a class="code hl_class" href="classsf_1_1Vector2.html">sf::Vector2f</a> <a class="code hl_function" href="classsf_1_1Transformable.html#a3de0c6d8957f3cf318092f3f60656391">scale</a> = <span class="keywordtype">object</span>.getScale();</div>
<div class="line"><span class="keywordtype">object</span>.setScale(<a class="code hl_function" href="classsf_1_1Transformable.html#a3de0c6d8957f3cf318092f3f60656391">scale</a>.x * factorX, <a class="code hl_function" href="classsf_1_1Transformable.html#a3de0c6d8957f3cf318092f3f60656391">scale</a>.y * factorY);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">factorX</td><td>Horizontal scale factor </td></tr>
    <tr><td class="paramname">factorY</td><td>Vertical scale factor</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#aaec50b46b3f41b054763304d1e727471" title="set the scale factors of the object">setScale</a> </dd></dl>

</div>
</div>
<a id="a14def44da6437bfea20c4df5e71aba4c" name="a14def44da6437bfea20c4df5e71aba4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14def44da6437bfea20c4df5e71aba4c">&#9670;&#160;</a></span>setColor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Sprite::setColor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Color.html">Color</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the global color of the sprite. </p>
<p>This color is modulated (multiplied) with the sprite's texture. It can be used to colorize the sprite, or change its global opacity. By default, the sprite's color is opaque white.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>New color of the sprite</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Sprite.html#af4a3ee8177fdd6e472a360a0a837d7cf" title="Get the global color of the sprite.">getColor</a> </dd></dl>

</div>
</div>
<a id="aa93a835ffbf3bee2098dfbbc695a7f05" name="aa93a835ffbf3bee2098dfbbc695a7f05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa93a835ffbf3bee2098dfbbc695a7f05">&#9670;&#160;</a></span>setOrigin() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::setOrigin </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
          <td class="paramname"><em>origin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the local origin of the object </p>
<p>The origin of an object defines the center point for all transformations (position, scale, rotation). The coordinates of this point must be relative to the top-left corner of the object, and ignore all transformations (position, scale, rotation). The default origin of a transformable object is (0, 0).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">origin</td><td>New origin</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a898b33eb6513161eb5c747a072364f15" title="get the local origin of the object">getOrigin</a> </dd></dl>

</div>
</div>
<a id="a56c67bd80aae8418d13fb96c034d25ec" name="a56c67bd80aae8418d13fb96c034d25ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56c67bd80aae8418d13fb96c034d25ec">&#9670;&#160;</a></span>setOrigin() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::setOrigin </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the local origin of the object </p>
<p>The origin of an object defines the center point for all transformations (position, scale, rotation). The coordinates of this point must be relative to the top-left corner of the object, and ignore all transformations (position, scale, rotation). The default origin of a transformable object is (0, 0).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X coordinate of the new origin </td></tr>
    <tr><td class="paramname">y</td><td>Y coordinate of the new origin</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a898b33eb6513161eb5c747a072364f15" title="get the local origin of the object">getOrigin</a> </dd></dl>

</div>
</div>
<a id="af1a42209ce2b5d3f07b00f917bcd8015" name="af1a42209ce2b5d3f07b00f917bcd8015"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1a42209ce2b5d3f07b00f917bcd8015">&#9670;&#160;</a></span>setPosition() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::setPosition </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
          <td class="paramname"><em>position</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the position of the object </p>
<p>This function completely overwrites the previous position. See the move function to apply an offset based on the previous position instead. The default position of a transformable object is (0, 0).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">position</td><td>New position</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a86b461d6a941ad390c2ad8b6a4a20391" title="Move the object by a given offset.">move</a>, <a class="el" href="classsf_1_1Transformable.html#aea8b18e91a7bf7be589851bb9dd11241" title="get the position of the object">getPosition</a> </dd></dl>

</div>
</div>
<a id="a4dbfb1a7c80688b0b4c477d706550208" name="a4dbfb1a7c80688b0b4c477d706550208"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4dbfb1a7c80688b0b4c477d706550208">&#9670;&#160;</a></span>setPosition() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::setPosition </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the position of the object </p>
<p>This function completely overwrites the previous position. See the move function to apply an offset based on the previous position instead. The default position of a transformable object is (0, 0).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X coordinate of the new position </td></tr>
    <tr><td class="paramname">y</td><td>Y coordinate of the new position</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a86b461d6a941ad390c2ad8b6a4a20391" title="Move the object by a given offset.">move</a>, <a class="el" href="classsf_1_1Transformable.html#aea8b18e91a7bf7be589851bb9dd11241" title="get the position of the object">getPosition</a> </dd></dl>

</div>
</div>
<a id="a32baf2bf1a74699b03bf8c95030a38ed" name="a32baf2bf1a74699b03bf8c95030a38ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32baf2bf1a74699b03bf8c95030a38ed">&#9670;&#160;</a></span>setRotation()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::setRotation </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>angle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the orientation of the object </p>
<p>This function completely overwrites the previous rotation. See the rotate function to add an angle based on the previous rotation instead. The default rotation of a transformable object is 0.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">angle</td><td>New rotation, in degrees</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#af8a5ffddc0d93f238fee3bf8efe1ebda" title="Rotate the object.">rotate</a>, <a class="el" href="classsf_1_1Transformable.html#aa00b5c5d4a06ac24a94dd72c56931d3a" title="get the orientation of the object">getRotation</a> </dd></dl>

</div>
</div>
<a id="a4c48a87f1626047e448f9c1a68ff167e" name="a4c48a87f1626047e448f9c1a68ff167e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c48a87f1626047e448f9c1a68ff167e">&#9670;&#160;</a></span>setScale() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::setScale </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
          <td class="paramname"><em>factors</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the scale factors of the object </p>
<p>This function completely overwrites the previous scale. See the scale function to add a factor based on the previous scale instead. The default scale of a transformable object is (1, 1).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">factors</td><td>New scale factors</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a3de0c6d8957f3cf318092f3f60656391" title="Scale the object.">scale</a>, <a class="el" href="classsf_1_1Transformable.html#a7bcae0e924213f2e89edd8926f2453af" title="get the current scale of the object">getScale</a> </dd></dl>

</div>
</div>
<a id="aaec50b46b3f41b054763304d1e727471" name="aaec50b46b3f41b054763304d1e727471"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaec50b46b3f41b054763304d1e727471">&#9670;&#160;</a></span>setScale() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Transformable::setScale </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>factorX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>factorY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the scale factors of the object </p>
<p>This function completely overwrites the previous scale. See the scale function to add a factor based on the previous scale instead. The default scale of a transformable object is (1, 1).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">factorX</td><td>New horizontal scale factor </td></tr>
    <tr><td class="paramname">factorY</td><td>New vertical scale factor</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Transformable.html#a3de0c6d8957f3cf318092f3f60656391" title="Scale the object.">scale</a>, <a class="el" href="classsf_1_1Transformable.html#a7bcae0e924213f2e89edd8926f2453af" title="get the current scale of the object">getScale</a> </dd></dl>

</div>
</div>
<a id="a3729c88d88ac38c19317c18e87242560" name="a3729c88d88ac38c19317c18e87242560"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3729c88d88ac38c19317c18e87242560">&#9670;&#160;</a></span>setTexture()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Sprite::setTexture </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;&#160;</td>
          <td class="paramname"><em>texture</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>resetRect</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change the source texture of the sprite. </p>
<p>The <em>texture</em> argument refers to a texture that must exist as long as the sprite uses it. Indeed, the sprite doesn't store its own copy of the texture, but rather keeps a pointer to the one that you passed to this function. If the source texture is destroyed and the sprite tries to use it, the behavior is undefined. If <em>resetRect</em> is true, the TextureRect property of the sprite is automatically adjusted to the size of the new texture. If it is false, the texture rect is left unchanged.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">texture</td><td>New texture </td></tr>
    <tr><td class="paramname">resetRect</td><td>Should the texture rect be reset to the size of the new texture?</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Sprite.html#a6d0f107b5dd5976be50bc5b163ba21aa" title="Get the source texture of the sprite.">getTexture</a>, <a class="el" href="classsf_1_1Sprite.html#a3fefec419a4e6a90c0fd54c793d82ec2" title="Set the sub-rectangle of the texture that the sprite will display.">setTextureRect</a> </dd></dl>

</div>
</div>
<a id="a3fefec419a4e6a90c0fd54c793d82ec2" name="a3fefec419a4e6a90c0fd54c793d82ec2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3fefec419a4e6a90c0fd54c793d82ec2">&#9670;&#160;</a></span>setTextureRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Sprite::setTextureRect </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Rect.html">IntRect</a> &amp;&#160;</td>
          <td class="paramname"><em>rectangle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the sub-rectangle of the texture that the sprite will display. </p>
<p>The texture rect is useful when you don't want to display the whole texture, but rather a part of it. By default, the texture rect covers the entire texture.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rectangle</td><td>Rectangle defining the region of the texture to display</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Sprite.html#afb19e5b4f39d17cf4d95752b3a79bcb6" title="Get the sub-rectangle of the texture displayed by the sprite.">getTextureRect</a>, <a class="el" href="classsf_1_1Sprite.html#a3729c88d88ac38c19317c18e87242560" title="Change the source texture of the sprite.">setTexture</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="Sprite_8hpp_source.html">Sprite.hpp</a></li>
</ul>
</div><!-- contents -->
        </div>
        <div id="footer-container">
            <div id="footer">
                SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
                Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
                Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
            </div>
        </div>
    </body>
</html>
